<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>找回密码</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="format-detection" content="telephone=no" />
	<link rel="stylesheet" href="../../css/public-heder-Reset.css">
	<link rel="stylesheet" href="../../css/input-button.css">
</head>
<body>
	<!-- page_box -->
	<div class="page-box">
		<!-- header -->
		<header class="page-header">
			<a href="javascript:history.go(-1)" class="back"></a>
			<p class="pege-name">找回登录密码</p>
		</header>
		<div class="liubai"></div>
		<!-- header /-->
		<!-- User-information -->
		<div class="User-information">
			<div class="User-form">
				<div class="phone-number">
					<label>
						<input type="tel" class="phoneNuber" style="font-size:17px"  placeholder="请输入手机号码" maxlength="11">
						<span class="phone"></span>
					</label>
				</div>
				<div class="Verification-code">
					<label>
						<input type="text" class="yanzm eliminate" style="font-size:17px" maxlength="11" placeholder="请输入验证码">
						<span class=""></span>
						<em class="phone-code">获取验证码</em>
					</label>
				</div> 
			</div>	
			<div class="submit-btn">
				<button style="border:none" disabled="disabled">下一步</button>
			</div>
		</div>
		<!-- User-information / -->
	</div>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/http-url.js"></script>
<script type="text/javascript">
	$(function(){
		$('.phone-code').click(function(){
			if (isClick) {
				return;
			}
			var phone_number=$('.phoneNuber').val().trim();
			var UserData={'phone_number':phone_number}
			if(!reg.test(phone_number)){
				promptBox('请输入正确的手机号码！');
				return
			}else {
				// 发送成功禁止点击获取验证码
				isClick=true;
				$('.phone-code').css({"color":"#ccc","borderColor":"#ccc"});
				//调用定时函数 设定剩余时间  名字 提示字符串 原本字符串 改变颜色
				timer(60,".phone-code","秒后失效","获取验证码","#6eba6f")
				ajaxRequest('/api/phone/vc',UserData,function(data){
					if (data.m_status!=200) {
							return
						}
				},false)
			}
		});
		$("input").on("keyup", function (event){
			var phoneNuber=$('.phoneNuber').val().trim();
			var yanzm=$('.yanzm').val().trim();
			if(reg.test(phoneNuber) && yanzm.length>=6){
				sureSubmit();
			}else {
				cannotSubmit();
			}
		});

		$('.submit-btn').find('button').click(function(){
			submitOk()
			var phone_number=$('.phoneNuber').val().trim();
			var yanzm=$('.yanzm').val().trim();
			var UserData={'phone_number':phone_number,'yanzm':yanzm}
			ajaxRequest('/api/phone/vc',UserData,function(data){
				if(data.m_status=='200'){
					window.location.href="Back-login-password.html";
				}
			},false)
		});
	})
</script>
</body>
</html>